package com.ideaaedi.zoo.example.springboot.flowable.sharding.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Administrator
 * @since 1.0.0
 */
@Getter
@Setter
@TableName("ACT_HI_VARINST")
@Schema(name = "ActHiVarinstPO", description = "历史变量")
public class ActHiVarinstPO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("ID_")
    @Schema(description = "id")
    private String id;

    public Integer getRev() {
        return rev;
    }

    public void setRev(Integer rev) {
        this.rev = rev;
    }

    @TableField("REV_")
    @Schema(description = "版本号")
    private Integer rev;

    @TableField("PROC_INST_ID_")
    @Schema(description = "流程实例ID")
    private String procInstId;

    @TableField("EXECUTION_ID_")
    @Schema(description = "执行实例ID")
    private String executionId;

    @TableField("TASK_ID_")
    @Schema(description = "任务ID")
    private String taskId;

    @TableField("NAME_")
    @Schema(description = "名称")
    private String name;

    @TableField("VAR_TYPE_")
    @Schema(description = "变量类型")
    private String varType;

    @TableField("SCOPE_ID_")
    @Schema(description = "业务域标识")
    private String scopeId;

    @TableField("SUB_SCOPE_ID_")
    @Schema(description = "业务域子域标识")
    private String subScopeId;

    @TableField("SCOPE_TYPE_")
    @Schema(description = "业务域类型")
    private String scopeType;

    @TableField("BYTEARRAY_ID_")
    @Schema(description = "字节流ID（ACT_GE_BYTEARRAY表ID）")
    private String bytearrayId;

    @TableField("DOUBLE_")
    @Schema(description = "浮点值")
    private Double doubleVal;

    @TableField("LONG_")
    @Schema(description = "长整型")
    private Long longVal;

    @TableField("TEXT_")
    @Schema(description = "文本值")
    private String text;

    @TableField("TEXT2_")
    @Schema(description = "文本值")
    private String text2;

    @TableField("META_INFO_")
    @Schema(description = "元数据")
    private String metaInfo;

    @TableField("CREATE_TIME_")
    @Schema(description = "创建时间")
    private Date createTime;

    @TableField("LAST_UPDATED_TIME_")
    @Schema(description = "最后更新时间")
    private Date lastUpdatedTime;
    
    @Schema(description = "日期（yyyy-MM-dd）")
    @TableField("sharding_date")
    private String shardingDate;

    /*
     *  解决mybatis查询数据后定位字段时，自动去除表列名的下划线并驼峰后，找不到对应的getter、setter的问题
     *  <展开说明>
     *  对于列名 LONG_ 、 DOUBLE_ ，查找setter时，会找对应 long  double 的setter、getter方法找，但是
     *  long  double又是关键字，不能作为字段名，那么这里 提供对应的setter，使得可以完成赋值操作
     *
     * 源码详见：org.apache.ibatis.reflection.MetaObject#findProperty(java.lang.String, boolean)
     */
    public void setLong(Long longVal) {
        this.longVal = longVal;
    }

    public void setDouble(Double doubleVal) {
        this.doubleVal = doubleVal;
    }
}
